home *** CD-ROM | disk | FTP | other *** search
/ Trading on the Edge / Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin / mac / Mac_Files / Vendor Demos / HiQ / HiQ•Help / HiQ•Help.rsrc / PICT_10704_ODE Initial Value pg 4.png < prev    next >
Portable Network Graphic  |  1992-04-28  |  73KB  |  816x1056  |  8-bit (256 colors)
Labels: book | chat room | crt screen | monitor | reckoner | sky
OCR: ODE IVP SOLVER SAMPLE SCRIPTS Example 3 .Solve the system of differential eguations: dX1 -0.04X1 0.01% X3 dx2 400Xj 100x 2X 3000x dx3 30x2 subject to the initial conditions: Xi(0) 1.0, X2 (0) =0, X3(0) =0 This system of "Reaction- -Rate Equations" describes the concentrations of the reactants in chemical reaction sytem as function of the time from the start of the reaction. Problem Script: Stiff: project ivpEqns initVector, ivpMatrix; local start finish firstStep stepSize, tolerance, seq Type; tolerance start finish 40; firstStep stepSize seqlype Function ivpEqns(t, x) dxdt[1] -0.04*x[1]+0. .01 *[2]*x[3] dxdt[2] 400 *x[1]-100* *[2]*x[3]-3000 *x[2]*x[2]; ddt[3] 30*x[2]*x[2]; return dxdt; end function; [ivpMatrix ,ivpVector] OdelvpStiff(ivpEqns initVector start, finish firstStep, stepSize to ...